<style scoped src="./index.scss" lang="scss" rel="stylesheet/scss"></style>
<template src="./index.html"></template>
<script>
const message = [
    "vue.draggable",
    "draggable",
    "component",
    "for",
    "vue.js 2.0",
    "based",
    "on",
    "Sortablejs",
];
export default {
    mixins: [Vue.prototype.$vFN.Mixins.Base],
    components: {
        Draggable: async () =>
            Vue.extend(await Vue.prototype.$vFN.Components.Base.Draggable()),
    },
    computed: {},
    data() {
        return {
            appWindow: window,

            myDraggableArray: message.map((name, index) => {
                return {
                    name,
                    order: index + 1,
                };
            }),
        };
    },
    methods: {
        sort() {
            this.myDraggableArray = this.myDraggableArray.sort(
                (a, b) => a.order - b.order
            );
        },
    },
    mounted() {},
    activated() {},
};
</script>